
package com.nanyang.tms.api.dto.request.pick;


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nanyang.common.core.domain.ApiRequest;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * <p>Description:服务商查询参数类</p>
 * 
 * @author lvxuepeng
 * @date 2020年11月11日 上午9:57:43
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Data
public class PickGoodsAddRequest extends ApiRequest {
	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 1L;
	@JsonIgnore
	private String pin;
	/**
	 * 企业编码
	 */
	@JsonIgnore
	private String companyCode;
	/**
	 * 总包裹数
	 */
	@NotNull(message = "总包裹数不能为空")
	private Integer packages;

	/**
	 * 总重量
	 */
	@NotNull(message = "总重量不能为空")
	@Digits(integer = 9, fraction=2, message = "weight格式不正确")
	@DecimalMin(value = "0.00", message = "weight格式不正确")
	private BigDecimal weight;

	/**
	 * 方数
	 */
	@NotNull(message = "方数不能为空")
	@Digits(integer = 9, fraction=2, message = "square格式不正确")
	@DecimalMin(value = "0.00", message = "square格式不正确")
	private BigDecimal square;

	/**
	 * 参考提货时间
	 */
	@NotEmpty(message = "参考提货时间不能为空")
	@Length(max = 20, message = "pickTime长度需小于20个字符")
	private String pickTime;

	/**
	 * 备注
	 */
	@Length(max = 200, message = "remark长度需小于200个字符")
	private String remark;

	/**
	 * 提货地址编码
	 */
	@NotEmpty(message = "提货地址编码不能为空")
	@Length(max = 32, message = "pickAddressCode长度需小于32个字符")
	private String pickAddressCode;
	@Override
	public void requestCheck() {
	}
}
